## 计算1-10的和
# count = 0
# sum = 0
#
# while count < 10:
#     count +=1
#     sum += count
# print(sum)


#########登录重试############
i = 0
while i <3:
    name = input("please input your name:")
    passwd = input("please input your passwd:")
    if name == "root" and passwd == "123456":
        print("登录成功!")
        break
    else:
        print(f"登录失败，还有{3-i-1}重试机会")
        i += 1